//
//  ScaleCollectionViewController.swift
//  CollectionViewUsage
//
//  Created by han on 2020/5/14.
//  Copyright © 2020 han. All rights reserved.
//

import UIKit

private let reuseIdentifier = "ScaleCell"

class ScaleCollectionViewController: UICollectionViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let scale = ScaleFlowLayout(itemSize: CGSize(width: 200, height: 300))
        collectionView.collectionViewLayout = scale
    }

    // MARK: UICollectionViewDataSource

    override func numberOfSections(in collectionView: UICollectionView) -> Int {
        return 1
    }

    override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return 20
    }

    override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath)
        return cell
    }

}

